

package test;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.ebook.util.DateUtil;




public class test_add {
	
public test_add(){
		
	}
private String name = "";
private int age = 0;
private double price = 0.0;

public static String mergerStr(String str1, String str2) {
    StringBuilder str = new StringBuilder();
    if (str1.length() < str2.length()) {
        String temp = str1;
        str1 = str2;
        str2 = temp;
    }
    int length1 = str1.length();
    int length2 = str2.length();
    boolean flag1 = false;
    boolean flag2 = false;
    int i = 2;
    String str11 = "";
    if (str1.indexOf(str2) != -1)
        str.append(str1);
    else if (str2.indexOf(str1) != -1)
        str.append(str2);
    else {
        for (; i < length2; i++) {
            if (str1.substring(0, i).equals(str2.substring(length2 - i, length2))) {
            	if(!str1.substring(0, i+1).equals(str2.substring(length2 - i-1, length2))){
            		str11 = str1.substring(0, i);
            		System.out.println("i:" + i);
            		flag1 = true;
                    break;
            	}
            }
            if (str1.substring(length1 - i, length1).equals(str2.substring(0, i))) {
                if(!str1.substring(length1 - i-1, length1).equals(str2.substring(0, i+1))){
                	str11 = str1.substring(length1 - i, length1);
                    System.out.println("i:" + i);
                    flag2 = true;
                    break;
                }
            }
        }
        System.out.println("str11:" + str11);
        System.out.println("flag1:" + flag1);
        System.out.println("flag2:" + flag2);
        if(flag1){
        	 str.append(str2).append(str1.substring(str1.substring(0,i).length()));
        }
        if(flag2){
        	str.append(str1.substring(0, str1.indexOf(str2.substring(0, i)))).append(str2);
        }
        

    }
    return str.toString();
}
public static void main(String[] args) throws ParseException {
String str = "2013-07-05 08:00:03";
//Date d = DateUtil.SDF2.parse(str);
Date d = new Date();
System.out.println(d.getTime());
System.out.println(d.getTime()/60000);
System.out.println(d.getTime()/60000-3);



}
public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}
public int getAge() {
	return age;
}
public void setAge(int age) {
	this.age = age;
}
public double getPrice() {
	return price;
}
public void setPrice(double price) {
	this.price = price;
}


}

